#include "cylinder.h"


Cylinder::Cylinder(float radius,float height, int sides)
	:Object3D(radius)
{
	m_radius = radius;
	m_height = height;
	m_sides = sides;
}


Cylinder::~Cylinder(void)
{
}


void Cylinder::Render()
{
	// aux wired cylinder.
	GLUquadric* quadric = gluNewQuadric();
	gluCylinder(quadric, m_radius, m_radius, m_height, m_sides, 100);
	gluDeleteQuadric(quadric);
}

float Cylinder::GetRadius()
{
	return m_radius;
}

void Cylinder::SetRadius(float radius)
{
	m_radius = radius;
}

float Cylinder::GetHeight()
{
	return m_height;
}

void Cylinder::SetHeight(float height)
{
	m_height = height;
}

int Cylinder::GetSides()
{
	return m_sides;

}

void Cylinder::SetSides(int sides)
{
	m_sides = sides;
}